package com.shengruan.common;

import java.util.*;

import com.shengruan.admin.vo.Article;
import com.shengruan.admin.vo.Product;
import com.shengruan.admin.vo.ProductClass;
import com.shengruan.admin.vo.SliderLogo;
import com.shengruan.user.action.AutoAuctionThread;


public class Constants {


    /**
     * *是否显示Sql**
     */
    public static boolean DEBUG_SQL_IF = false;

    /**
     * *是否启动调试***
     */
    public static boolean DEBUG_IF = false;
    /**
     * 应用根路径***
     */
    public static String APP_PATH = "";

    public static String passwordKey = "adb621dThsXZGUo2";
    /**
     * 分页设置
     */
    public static int DEFAULT_PAGE_SIZE = 20;

    /**
     * 状态：可用
     */
    public static final int STATUS_ACTIVE = 1;

    /**
     * 状态：不可用
     */
    public static final int STATUS_INACTIVE = 0;

    /* 商品竞拍状态常量 */
    public static final int PRODUCT_AUCTION_STATUS_AVAILABLE = 1;   //即将开始
    public static final int PRODUCT_AUCTION_STATUS_ACTIVE = 2;      //竞拍中
    public static final int PRODUCT_AUCTION_STATUS_FROZEN = 3;      //竞拍结束


    /** 用户充值状态 */
    public static final int USER_RECHARGE_STATUS_PENDING = 0;//待处理
    public static final int USER_RECHARGE_STATUS_FAILURE = 1;//失败
    public static final int USER_RECHARGE_STATUS_SUCCESS = 2;//成功

    /** 订单状态 */
    public static final int ORDERS_STATUS_AWAITING_PAYMENT = 0;//等待买家付款
    public static final int ORDERS_STATUS_WAITING_FOR_SHIPMENT = 1;//等待卖家发货
    public static final int ORDERS_STATUS_WAIT_FOR_CONFIRMATION_RECEIPT = 2;//等待买家确认收货
    public static final int ORDERS_STATUS_TRADING_SUCCESS = 3;//交易成功
    public static final int ORDERS_STATUS_CANCEL = 4;//取消
    public static final int ORDERS_STATUS_FAILURE = 5;//订单付款失败


    /** 订单统计状态 */

    public static final int ORDERS_REPORT_STATUS_PREVIOUS_WEEK = 1; //上一周
    public static final int ORDERS_REPORT_STATUS_THREE_DAYS = 2; //三天内
    public static final int ORDERS_REPORT_STATUS_CURRENT_WEEK = 3; //本周
    public static final int ORDERS_REPORT_STATUS_CURRENT_MONTH = 4; //本月



    public static int USER_INVITEMAXBIDDING ;
    public static int PRODUCT_DISABLE_DAYS;




    /** 用于首页公告显示的静态list */
    public static List<Article> articleList = new ArrayList<Article>();

    /** 首页滑动Logo显示  */
    public static List<SliderLogo> sliderLogoList = new ArrayList<SliderLogo>();

    /***商品分类***/
    public static List<ProductClass> productClassList = new ArrayList<ProductClass>();

    /**
     * 页面token
     */
    public static final String CLIENT_TOKEN = "clientToken";
    public static final String TOKEN = "token";


    public static final String ADMIN = "admin";
    public static final String ERROR = "error";
    public static final String MESSAGE = "message";
    public static final String USER = "user";

    //用户自动登录，浏览器cookie key
    public static final String COOKIE_REMEMBERME_KEY="ldp.cookie.rememberme";

    public static final String USER_MESSAGE_COUNT = "userMessageCount";

    //用户注销action地址
    public static final String USER_LOGOUT = "/user-logout.ac";

    //product_class_list
    public static final String PRODUCT_CLASS_LIST = "PRODUCT_CLASS_LIST";
    public static final String QUESTION_LIST = "QUESTION_LIST";
    public static final String PRODUCT_MENU_MAP = "PRODUCT_MENU_MAP";
    public static  Map<String ,List<Product>> PRODUCT_MENU_LIST = new HashMap<String ,List<Product>>();


    //product auction status
    public static final Map<Integer, String> PRODUCT_AUCTION_STATUS;
    static {
        Map<Integer, String> map = new LinkedHashMap<Integer, String>();
        map.put(1, "即将开始");
        map.put(2, "竞拍中");
        map.put(3, "竞拍结束");
        PRODUCT_AUCTION_STATUS = Collections.unmodifiableMap(map);
    }
    
	public static AutoAuctionThread autoAuctionThread = null;


    public static final Map<Integer, String > ORDERS_REPORT_STATUS_MAP;
    static {
        Map<Integer, String > map = new LinkedHashMap<Integer, String >();
        map.put(0, "所有");
        map.put(1, "上一周");
        map.put(2, "三天内");
        map.put(3, "本周");
        map.put(4, "本月");
        ORDERS_REPORT_STATUS_MAP = Collections.unmodifiableMap(map);
    }

    public static final Map<Integer, String > ORDERS_STATUS_MAP;
    static {
        Map<Integer, String > map = new LinkedHashMap<Integer, String >();
        map.put(0, "等待买家付款");
        map.put(1, "等待卖家发货");
        map.put(2, "等待买家确认收货");
        map.put(3, "交易成功");
        map.put(4, "已取消订单");
        map.put(5, "订单付款失败");
        ORDERS_STATUS_MAP = Collections.unmodifiableMap(map);
    }

    public static final Map<Integer, String> ARTICLE_TYPE_MAP;
    static {
        Map<Integer, String > map = new LinkedHashMap<Integer, String >();
        map.put(1, "活动讯息");
        map.put(2, "新闻消息");
        map.put(3, "媒体剪报");
        ARTICLE_TYPE_MAP = Collections.unmodifiableMap(map);
    }

}
